
#ifndef _MEMBER_BREALSPINBOX_H_
#define _MEMBER_BREALSPINBOX_H_

#include <BButton>
#include <BRealSpinBox>
#include "ILineBlock.h"

namespace BWE
{
	class member_BRealSpinBox : public BObject
	{
		friend class BRealSpinBox;
	public:
		member_BRealSpinBox(BRealSpinBox* doubleSpinbox);
		~member_BRealSpinBox();

		int freshBitNum();
		bool freshSizes();
		bool freshRects();
		void freshInputLine();
		void textEdited();

		void slotButtonClicked(BObject* object);

		BRealSpinBox*	boss;
		Align			align;
		BReal			value;
		BReal			step;
		BRealRange		range;
		BString			prefix;
		BString			suffix;
		BButton*		upButton;
		BButton*		downButton;
		bool			readOnly;
		bool			formulable;
		int				decimals;
		int				bitNum;
		BReal			blinkTime;
		BReal			blinkTick;
		bool			blinkShown;

		bool			dirtySize;
		BString			t_prefix;
		BSize			prefixSize;
		BString			t_suffix;
		BSize			suffixSize;
		BRect			textArea;

		bool			dirty;
		bool			editing;
		BReal			focusedTime;
		bool			hovered;
		bool			pressed;
		int				pressedIndex;
		BRect			prefixRect;
		ILineBlock		block;
		BRect			suffixRect;
		int				hoverIndex;
		bool			dirtyLine;
		BPoint			lineBegin;
		BPoint			lineEnd;
	};
}

#endif